<extend name="Public:base" />
<block name="title"><title>财务中心</title></block>
<block name="header_styles">
    <style type="text/css">
        .fancybox-inner {
            border-radius: 5px;
        }
        .temp-warning{display:inline-block;border:1px solid #999;margin-left: 10px;padding: 3px;}
    </style>
</block>
<block name="main">
    <include file="Finance:common-statistic" />
    
    <notempty name="tipArr">
    <div class="finance-warning">
        <div class="pull-left">
            <label>财务提醒：</label>
        </div>
        <volist name="tipArr" id="tip">
        <div class="pull-left">
           {$tip.msg} 
        </div>
        <a href="javascript:;" class="temp-warning">╳&nbsp;不再提醒</a>
        <div class="clearfix"></div>
        </volist>
    </div>
    </notempty>
    <div class="finance-table">
        <div class="finance-table-heading">
            <ul>
                <li class="active"><a href="#">进行中</a></li>
            </ul>
        </div>
        <table>
            <tr>
                <th>托管类型</th>
                <th>职位名称</th>
                <th>所属团队</th>
                <th>入职时间</th>
                <th>约定薪酬</th>
                <th>实发薪酬</th>
                <th>支付状态</th>
                <th>操作</th>
            </tr>
            <empty name="doingjobArr">
            <tr><td colspan="8">目前没有进行中的职位</td></tr>
            <else />
            <volist name="doingjobArr" id="job">
            <if condition="$job['instalment'] eq 1">
            <tr>
                <td>全额托管</td>
                <td>{$job.jname}</td>
                <td>{$tname}</td>
                <td><notempty name="$job['jointime']">{$job.jointime|date='Y.m.d',###}<else/>—</notempty></td>
                <td>{$job.salary}元</td>
                <td><notempty name="$job['income']">{$job.income}<else/>—</notempty></td>
                <td><span href="javascript:void(0);" class="tuo-guang <gt name="job['moneyin']" value='0'>active</gt>" style="border-radius: 5px;">{$job['moneyin']|toTuoguanDesc}</span></td>
                <td><a href="javascript:void(0);" class="btn btn-green2 pay-feedback">付款评价</a></td>
            </tr>
            <else />
            <tr>
                <td>分批托管</td>
                <td>{$job.jname}</td>
                <td>{$tname}</td>
                <td><notempty name="$job['jointime']">{$job.jointime|date='Y.m.d',###}<else/>—</notempty></td>
                <td>{$job.salary}元</td>
                <td>—</td>
                <td><i class="fa fa-chevron-down"></i></td>
                <td><i class="fa fa-chevron-down"></i></td>
            </tr>
            <volist name="job['instals']" id="instal" key='i'>
            <tr class="tr-steps">
                <td></td>
                <td></td>
                <td></td>
                <td class="text-right"><strong>第{$i}笔</strong></td>
                <td>{$instal.amount}元</td>
                <td>—</td>
                <td><span href="javascript:void(0);" class="tuo-guang <gt name="instal['moneyin']" value='0'>active</gt>" style="border-radius: 5px;">{$instal['moneyin']|toTuoguanDesc}</span></td>
                <td><a href="javascripti:void(0);" class="btn btn-green2 pay">付款</a></td>
            </tr>
            </volist>
            </if>
            </volist>
            </if>
            </empty>
        </table>
    </div>

    <include file="Finance:common-list" />
    <include file="Finance:common-boxtpl" />
</block>
<block name="footer_scripts">
    <script type="text/javascript">
        requirejs(["jquery", "modules/message"], function () {
            $(function () {
                $("a.get-cash").click(function () {
                    $.fancybox.open("/Html-cash.html", {
                        autoResize: true,
                        type: 'iframe',
                        fitToView: true,
                        padding: 0,
                        closeBtn: false,
                        width: 550,
                    });
                });

                $("a.recharge").click(function () {
                    $.fancybox.open("/Html-recharge.html", {
                        autoResize: true,
                        type: 'iframe',
                        fitToView: true,
                        padding: 0,
                        closeBtn: false,
                        width: 400,
                    });
                });
                
                $(document).on("click", "a.pay-feedback", function () {
                    $.fancybox.open("/Html-pay_feedback.html", {
                        autoResize: true,
                        type: 'iframe',
                        fitToView: true,
                        padding: 0,
                        closeBtn: false,
                        width: 700,
                    });
                });
                $(document).on("click", "a.pay", function () {
                    $.fancybox.open("/Html-pay_feedback2.html",
                      {
                          autoResize: true,
                          type: 'iframe',
                          fitToView: true,
                          padding: 0,
                          closeBtn: false,
                          width: 700,
                      });
                });
                $(document).on("click", "a.pay-hosting", function () {
                    $.fancybox.open("/Html-pay_hosting.html",
                      {
                          autoResize: true,
                          type: 'iframe',
                          fitToView: true,
                          padding: 0,
                          closeBtn: false,
                          width: 400,
                      });
                });

            });
        });
    </script>

</block>